<?php

if (!defined('IN_ADMIN')) {
    exit('Access Denied');
}

$mpurl	 			= 'admin.php?ac=diarycomments';
$param['perpage']	=	20;

if ($_GET['query'] == 1)/*{{{*/
{
	$param				=	$_GET;
	$param['do']		=	'findComment';
	$param['format']	=	'json';
	$param['start']   	=   intval($_GET ['start']) > 0 ? intval($_GET ['start']) : 0;
	$param['perpage']	=   intval($_GET ['perpage']) > 0 ? intval($_GET ['perpage']) : 20;
	$param['type']		=	1;
	
	$content  =  get_api_content($_SC ['apiurl'], $param);
	$content  =  json_decode($content);
	$result   =  object_to_array($content->resultData);
	for ($i=0;$i<count($result)-1;$i++)
	{
		$list[]	  =		$result[$i];
	}
}/*}}}*/

// 搜索条件
$intkeys = array(
		'uid',
		'cUid',
		'rUid',
		'parentId',
		'bodyId',
		'time',
		'replyTime',
);

//条件恢复
$orderbyArr			=	array($param['orderby']	 => " selected");
$orderscArr 		=	array($param['ordersc']  => " selected");
$uid				=	$param['uid'];
$cUid				=	$param['cUid'];
$rUid				=	$param['rUid'];
$bodyId				=	$param['bodyId'];
$parentId			=	$param['parentId'];
$timeArr			=	array($param['time1'],	$param['time2']);
$replyTimeArr		=	array($param['replyTime1'],  $param['replyTime2']);

// page
$query		=	"&query=1";
$mpurl	   .= 	$result['urls'].$query;
$pageurl 	= 	multi($param['start'], $param['perpage'], $mpurl);
$nextpurl 	= 	$pageurl['next'];
$prevpurl 	= 	$pageurl['prev'];
$mpurl 		= 	$pageurl['urls'];
$firstpurl  = 	$pageurl['first'];

